#include <stdio.h>

#include "DEMConverter.h"

int main(int argc, char** argv)
{
    if(argc != 3)
    {
        printf("Usage dem-converter inputfile outputfile\n");
        return 0;
    }
    
    DEMConverter converter;
    
    bool result = converter.convert(argv[1], argv[2]);
    
    if(result)
    {
        int r,c;
        sgFloat min, max;
        sgFloat** heightMap = converter.load(argv[2],&r,&c, &min, &max);
        
        converter.saveAsPng(heightMap, r, c, min, max, "test.png");
    }
    
    return result;
}
